package com.xiaodu.yaml.properties;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.PropertySource;
import org.springframework.stereotype.Component;

/**
 * @author: dutianjie
 * @date: 2021/3/23
 * @version: v1.0.0
 * @description: 描述
 * @email: dutianjie@thunisoft.com
 **/
@Component
@PropertySource("url:${myConfig.url}/config/fruits/price")
@ConfigurationProperties(prefix = "fruits")
public class FruitsProperties {

    private String apple;

    private String banana;

    @Override
    public String toString() {
        return "FruitsProperties{" +
                "apple='" + apple + '\'' +
                ", banana='" + banana + '\'' +
                '}';
    }

    public String getApple() {
        return apple;
    }

    public void setApple(String apple) {
        this.apple = apple;
    }

    public String getBanana() {
        return banana;
    }

    public void setBanana(String banana) {
        this.banana = banana;
    }
}
